home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Controls.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  23.8 KB  |  774 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Controls.a
  3. ;
  4. ;    Contains:    Control Manager interfaces
  5. ;
  6. ;    Version:    Technology:    MacOS 7.x
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1985-1997 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__CONTROLS__') = 'UNDEFINED' THEN
  19. __CONTROLS__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  28.     include 'Menus.a'
  29.     ENDIF
  30.  
  31.  
  32. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  33. ;      • Resource types
  34. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  35.  
  36.  
  37.  
  38. kControlDefProcType                EQU        'CDEF'
  39. kControlTemplateResourceType    EQU        'CNTL'
  40. kControlColorTableResourceType    EQU        'cctb'
  41. kControlDefProcResourceType        EQU        'CDEF'
  42.  
  43. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  44. ;      • Format of a 'CNTL' resource
  45. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  46.  
  47.  
  48.  
  49. ControlTemplate            RECORD 0
  50. controlRect                 ds        Rect            ; offset: $0 (0)
  51. controlValue             ds.w    1                ; offset: $8 (8)
  52. controlVisible             ds.b    1                ; offset: $A (10)
  53. fill                     ds.b    1                ; offset: $B (11)
  54. controlMaximum             ds.w    1                ; offset: $C (12)
  55. controlMinimum             ds.w    1                ; offset: $E (14)
  56. controlDefProcID         ds.w    1                ; offset: $10 (16)
  57. controlReference         ds.l    1                ; offset: $12 (18)
  58. controlTitle             ds        Str255            ; offset: $16 (22)
  59. sizeof                     EQU *                    ; size:   $116 (278)
  60.                         ENDR
  61. ; typedef struct ControlTemplate *        ControlTemplatePtr
  62.  
  63. ; typedef ControlTemplatePtr *            ControlTemplateHandle
  64.  
  65.  
  66. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  67. ;   • CONTROL DEFINITION ID'S
  68. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  69.  
  70.  
  71.  
  72. ;  Standard System 7 procID's
  73.  
  74.  
  75. pushButProc                        EQU        0
  76. checkBoxProc                    EQU        1
  77. radioButProc                    EQU        2
  78. scrollBarProc                    EQU        16
  79. popupMenuProc                    EQU        1008
  80.  
  81. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  82. ;   • VARIANT CODES
  83. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  84.  
  85.  
  86. ; typedef SInt16                         ControlVariant
  87.  
  88.  
  89. kControlNoVariant                EQU        0                    ; No variant
  90. kControlUsesOwningWindowsFontVariant EQU $08                ; Control uses owning windows font to display text
  91.  
  92. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  93. ;   • CONTROL PART CODES
  94. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  95.  
  96.  
  97. ; typedef SInt16                         ControlPartCode
  98.  
  99.  
  100. kControlNoPart                    EQU        0
  101. kControlLabelPart                EQU        1
  102. kControlMenuPart                EQU        2
  103. kControlTrianglePart            EQU        4
  104. kControlButtonPart                EQU        10
  105. kControlCheckBoxPart            EQU        11
  106. kControlRadioButtonPart            EQU        11
  107. kControlUpButtonPart            EQU        20
  108. kControlDownButtonPart            EQU        21
  109. kControlPageUpPart                EQU        22
  110. kControlPageDownPart            EQU        23
  111. kControlIndicatorPart            EQU        129
  112. kControlDisabledPart            EQU        254
  113. kControlInactivePart            EQU        255
  114.  
  115. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  116. ;   • CHECK BOX VALUES
  117. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  118.  
  119.  
  120.  
  121.  
  122. kControlCheckBoxUncheckedValue    EQU        0
  123. kControlCheckBoxCheckedValue    EQU        1
  124. kControlCheckBoxMixedValue        EQU        2
  125.  
  126. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  127. ;   • RADIO BUTTON VALUES
  128. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  129.  
  130.  
  131.  
  132.  
  133. kControlRadioButtonUncheckedValue EQU    0
  134. kControlRadioButtonCheckedValue    EQU        1
  135. kControlRadioButtonMixedValue    EQU        2
  136.  
  137. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  138. ;   
  139. ;   • CONTROL POP-UP MENU CONSTANTS
  140. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  141.  
  142.  
  143.  
  144. ;  Variant codes for the System 7 pop-up menu
  145.  
  146. popupFixedWidth                    EQU        $01
  147. popupVariableWidth                EQU        $02
  148. popupUseAddResMenu                EQU        $04
  149. popupUseWFont                    EQU        $08
  150. ;  Menu label styles for the System 7 pop-up menu 
  151.  
  152. popupTitleBold                    EQU        $0100
  153. popupTitleItalic                EQU        $0200
  154. popupTitleUnderline                EQU        $0400
  155. popupTitleOutline                EQU        $0800
  156. popupTitleShadow                EQU        $1000
  157. popupTitleCondense                EQU        $2000
  158. popupTitleExtend                EQU        $4000
  159. popupTitleNoStyle                EQU        $8000
  160. ;  Menu label justifications for the System 7 pop-up menu
  161.  
  162. popupTitleLeftJust                EQU        $00000000
  163. popupTitleCenterJust            EQU        $00000001
  164. popupTitleRightJust                EQU        $000000FF
  165.  
  166. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  167. ;   • CONTROL DRAGGRAYRGN CONSTANTS
  168. ;     For DragGrayRgnUPP used in TrackControl() 
  169. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  170.  
  171.  
  172.  
  173.  
  174. noConstraint                    EQU        0
  175. hAxisOnly                        EQU        1
  176. vAxisOnly                        EQU        2
  177.  
  178. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  179. ;   • CONTROL COLOR TABLE PART CODES
  180. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  181.  
  182.  
  183.  
  184.  
  185. cFrameColor                        EQU        0
  186. cBodyColor                        EQU        1
  187. cTextColor                        EQU        2
  188. cThumbColor                        EQU        3
  189. kNumberCtlCTabEntries            EQU        4
  190.  
  191. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  192. ;   • CONTROLHANDLE
  193. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  194.  
  195.  
  196.  
  197.  
  198.  
  199. ; typedef ControlRecord *                ControlPtr
  200.  
  201. ; typedef ControlPtr *                    ControlHandle
  202.  
  203. ;  ControlRef is obsolete. Use ControlHandle. 
  204. ; typedef ControlHandle                 ControlRef
  205.  
  206.  
  207. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  208. ;   • CONTROL ACTIONPROC POINTER
  209. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  210.  
  211.  
  212.  
  213. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  214. ;   • CONTROL COLOR TABLE
  215. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  216.  
  217.  
  218. CtlCTab                    RECORD 0
  219. ccSeed                     ds.l    1                ; offset: $0 (0)
  220. ccRider                     ds.w    1                ; offset: $4 (4)
  221. ctSize                     ds.w    1                ; offset: $6 (6)
  222. ctTable                     ds.b    4 * ColorSpec.sizeof ; offset: $8 (8)
  223. sizeof                     EQU *                    ; size:   $28 (40)
  224.                         ENDR
  225. ; typedef struct CtlCTab *                CCTabPtr
  226.  
  227. ; typedef CCTabPtr *                    CCTabHandle
  228.  
  229.  
  230. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  231. ;   • CONTROL RECORD
  232. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  233.  
  234.  
  235. ControlRecord            RECORD 0
  236. nextControl                 ds.l    1                ; offset: $0 (0)
  237. contrlOwner                 ds.l    1                ; offset: $4 (4)
  238. contrlRect                 ds        Rect            ; offset: $8 (8)
  239. contrlVis                 ds.b    1                ; offset: $10 (16)
  240. contrlHilite             ds.b    1                ; offset: $11 (17)
  241. contrlValue                 ds.w    1                ; offset: $12 (18)
  242. contrlMin                 ds.w    1                ; offset: $14 (20)
  243. contrlMax                 ds.w    1                ; offset: $16 (22)
  244. contrlDefProc             ds.l    1                ; offset: $18 (24)
  245. contrlData                 ds.l    1                ; offset: $1C (28)
  246. contrlAction             ds.l    1                ; offset: $20 (32)
  247. contrlRfCon                 ds.l    1                ; offset: $24 (36)
  248. contrlTitle                 ds        Str255            ; offset: $28 (40)
  249. sizeof                     EQU *                    ; size:   $128 (296)
  250.                         ENDR
  251.  
  252. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  253. ;   • AUXILLARY CONTROL RECORD STRUCTURE
  254. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  255.  
  256.  
  257. AuxCtlRec                RECORD 0
  258. acNext                     ds.l    1                ; offset: $0 (0)
  259. acOwner                     ds.l    1                ; offset: $4 (4)
  260. acCTable                 ds.l    1                ; offset: $8 (8)
  261. acFlags                     ds.w    1                ; offset: $C (12)
  262. acReserved                 ds.l    1                ; offset: $E (14)
  263. acRefCon                 ds.l    1                ; offset: $12 (18)
  264. sizeof                     EQU *                    ; size:   $16 (22)
  265.                         ENDR
  266. ; typedef struct AuxCtlRec *            AuxCtlPtr
  267.  
  268. ; typedef AuxCtlPtr *                    AuxCtlHandle
  269.  
  270.  
  271. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  272. ;   • POP-UP MENU PRIVATE DATA STRUCTURE
  273. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  274.  
  275.  
  276. PopupPrivateData        RECORD 0
  277. mHandle                     ds.l    1                ; offset: $0 (0)
  278. mID                         ds.w    1                ; offset: $4 (4)
  279. sizeof                     EQU *                    ; size:   $6 (6)
  280.                         ENDR
  281. ; typedef struct PopupPrivateData *        PopupPrivateDataPtr
  282.  
  283. ; typedef PopupPrivateDataPtr *            PopupPrivateDataHandle
  284.  
  285.  
  286. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  287. ;   • CONTROL ACTION PROC UPP'S
  288. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  289.  
  290.  
  291.  
  292.  
  293.  
  294. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  295. ;      
  296. ;   • CONTROL CREATION / DELETION API'S
  297. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  298.  
  299.  
  300. ;
  301. ; pascal ControlHandle NewControl(WindowPtr owningWindow, const Rect *boundsRect, ConstStr255Param controlTitle, Boolean initiallyVisible, SInt16 initialValue, SInt16 minimumValue, SInt16 maximumValue, SInt16 procID, SInt32 controlReference)
  302. ;
  303.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  304.         _NewControl:    OPWORD    $A954
  305.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  306.         IMPORT_CFM_FUNCTION NewControl
  307.     ENDIF
  308.  
  309. ;
  310. ; pascal ControlHandle GetNewControl(SInt16 resourceID, WindowPtr owningWindow)
  311. ;
  312.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  313.         _GetNewControl:    OPWORD    $A9BE
  314.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  315.         IMPORT_CFM_FUNCTION GetNewControl
  316.     ENDIF
  317.  
  318. ;
  319. ; pascal void DisposeControl(ControlHandle theControl)
  320. ;
  321.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  322.         _DisposeControl:    OPWORD    $A955
  323.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  324.         IMPORT_CFM_FUNCTION DisposeControl
  325.     ENDIF
  326.  
  327. ;
  328. ; pascal void KillControls(WindowPtr theWindow)
  329. ;
  330.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  331.         _KillControls:    OPWORD    $A956
  332.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  333.         IMPORT_CFM_FUNCTION KillControls
  334.     ENDIF
  335.  
  336.  
  337. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  338. ;      
  339. ;   • CONTROL SHOWING/HIDING API'S
  340. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  341.  
  342.  
  343.  
  344. ;
  345. ; pascal void ShowControl(ControlHandle theControl)
  346. ;
  347.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  348.         _ShowControl:    OPWORD    $A957
  349.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  350.         IMPORT_CFM_FUNCTION ShowControl
  351.     ENDIF
  352.  
  353. ;
  354. ; pascal void HideControl(ControlHandle theControl)
  355. ;
  356.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  357.         _HideControl:    OPWORD    $A958
  358.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  359.         IMPORT_CFM_FUNCTION HideControl
  360.     ENDIF
  361.  
  362.  
  363. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  364. ;      
  365. ;   • CONTROL DRAWING API'S
  366. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  367.  
  368.  
  369.  
  370. ;
  371. ; pascal void DrawControls(WindowPtr theWindow)
  372. ;
  373.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  374.         _DrawControls:    OPWORD    $A969
  375.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  376.         IMPORT_CFM_FUNCTION DrawControls
  377.     ENDIF
  378.  
  379. ;
  380. ; pascal void Draw1Control(ControlHandle theControl)
  381. ;
  382.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  383.         _Draw1Control:    OPWORD    $A96D
  384.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  385.         IMPORT_CFM_FUNCTION Draw1Control
  386.     ENDIF
  387.  
  388.  
  389. ;
  390. ; pascal void UpdateControls(WindowPtr theWindow, RgnHandle updateRegion)
  391. ;
  392.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  393.         _UpdateControls:    OPWORD    $A953
  394.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  395.         IMPORT_CFM_FUNCTION UpdateControls
  396.     ENDIF
  397.  
  398.  
  399. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  400. ;      
  401. ;   • CONTROL HIGHLIGHT API'S
  402. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  403.  
  404.  
  405.  
  406. ;
  407. ; pascal void HiliteControl(ControlHandle theControl, ControlPartCode hiliteState)
  408. ;
  409.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  410.         _HiliteControl:    OPWORD    $A95D
  411.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  412.         IMPORT_CFM_FUNCTION HiliteControl
  413.     ENDIF
  414.  
  415.  
  416. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  417. ;      
  418. ;   • CONTROL TRACKING/DRAGGING API'S
  419. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  420.  
  421.  
  422.  
  423.  
  424. ;      When using the TrackControl() call when tracking an indicator, the actionProc parameter (type ControlActionUPP) 
  425. ;    should be replaced by a parameter of type DragGrayRgnUPP (see Quickdraw.h).
  426.  
  427.  
  428. ;
  429. ; pascal ControlPartCode TrackControl(ControlHandle theControl, Point startPoint, ControlActionUPP actionProc)
  430. ;
  431.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  432.         _TrackControl:    OPWORD    $A968
  433.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  434.         IMPORT_CFM_FUNCTION TrackControl
  435.     ENDIF
  436.  
  437. ;
  438. ; pascal void DragControl(ControlHandle theControl, Point startPoint, const Rect *limitRect, const Rect *slopRect, DragConstraint axis)
  439. ;
  440.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  441.         _DragControl:    OPWORD    $A967
  442.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  443.         IMPORT_CFM_FUNCTION DragControl
  444.     ENDIF
  445.  
  446. ;
  447. ; pascal ControlPartCode TestControl(ControlHandle theControl, Point testPoint)
  448. ;
  449.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  450.         _TestControl:    OPWORD    $A966
  451.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  452.         IMPORT_CFM_FUNCTION TestControl
  453.     ENDIF
  454.  
  455. ;
  456. ; pascal ControlPartCode FindControl(Point testPoint, WindowPtr theWindow, ControlHandle *theControl)
  457. ;
  458.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  459.         _FindControl:    OPWORD    $A96C
  460.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  461.         IMPORT_CFM_FUNCTION FindControl
  462.     ENDIF
  463.  
  464.  
  465. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  466. ;      
  467. ;   • CONTROL MOVING/SIZING API'S
  468. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  469.  
  470.  
  471.  
  472. ;
  473. ; pascal void MoveControl(ControlHandle theControl, SInt16 h, SInt16 v)
  474. ;
  475.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  476.         _MoveControl:    OPWORD    $A959
  477.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  478.         IMPORT_CFM_FUNCTION MoveControl
  479.     ENDIF
  480.  
  481. ;
  482. ; pascal void SizeControl(ControlHandle theControl, SInt16 w, SInt16 h)
  483. ;
  484.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  485.         _SizeControl:    OPWORD    $A95C
  486.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  487.         IMPORT_CFM_FUNCTION SizeControl
  488.     ENDIF
  489.  
  490.  
  491. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  492. ;      
  493. ;   • CONTROL TITLE API'S
  494. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  495.  
  496.  
  497.  
  498. ;
  499. ; pascal void SetControlTitle(ControlHandle theControl, ConstStr255Param title)
  500. ;
  501.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  502.         _SetControlTitle:    OPWORD    $A95F
  503.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  504.         IMPORT_CFM_FUNCTION SetControlTitle
  505.     ENDIF
  506.  
  507. ;
  508. ; pascal void GetControlTitle(ControlHandle theControl, Str255 title)
  509. ;
  510.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  511.         _GetControlTitle:    OPWORD    $A95E
  512.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  513.         IMPORT_CFM_FUNCTION GetControlTitle
  514.     ENDIF
  515.  
  516.  
  517. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  518. ;      
  519. ;   • CONTROL VALUE, MIMIMUM, AND MAXIMUM API'S
  520. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  521.  
  522.  
  523.  
  524. ;
  525. ; pascal SInt16 GetControlValue(ControlHandle theControl)
  526. ;
  527.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  528.         _GetControlValue:    OPWORD    $A960
  529.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  530.         IMPORT_CFM_FUNCTION GetControlValue
  531.     ENDIF
  532.  
  533. ;
  534. ; pascal void SetControlValue(ControlHandle theControl, SInt16 newValue)
  535. ;
  536.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  537.         _SetControlValue:    OPWORD    $A963
  538.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  539.         IMPORT_CFM_FUNCTION SetControlValue
  540.     ENDIF
  541.  
  542. ;
  543. ; pascal SInt16 GetControlMinimum(ControlHandle theControl)
  544. ;
  545.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  546.         _GetControlMinimum:    OPWORD    $A961
  547.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  548.         IMPORT_CFM_FUNCTION GetControlMinimum
  549.     ENDIF
  550.  
  551. ;
  552. ; pascal void SetControlMinimum(ControlHandle theControl, SInt16 newMinimum)
  553. ;
  554.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  555.         _SetControlMinimum:    OPWORD    $A964
  556.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  557.         IMPORT_CFM_FUNCTION SetControlMinimum
  558.     ENDIF
  559.  
  560. ;
  561. ; pascal SInt16 GetControlMaximum(ControlHandle theControl)
  562. ;
  563.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  564.         _GetControlMaximum:    OPWORD    $A962
  565.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  566.         IMPORT_CFM_FUNCTION GetControlMaximum
  567.     ENDIF
  568.  
  569. ;
  570. ; pascal void SetControlMaximum(ControlHandle theControl, SInt16 newMaximum)
  571. ;
  572.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  573.         _SetControlMaximum:    OPWORD    $A965
  574.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  575.         IMPORT_CFM_FUNCTION SetControlMaximum
  576.     ENDIF
  577.  
  578.  
  579. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  580. ;      
  581. ;   • CONTROL VARIANT AND WINDOW INFORMATION API'S
  582. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  583.  
  584.  
  585.  
  586. ;
  587. ; pascal ControlVariant GetControlVariant(ControlHandle theControl)
  588. ;
  589.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  590.         _GetControlVariant:    OPWORD    $A809
  591.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  592.         IMPORT_CFM_FUNCTION GetControlVariant
  593.     ENDIF
  594.  
  595.  
  596. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  597. ;      
  598. ;   • CONTROL ACTION PROC API'S
  599. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  600.  
  601.  
  602.  
  603. ;
  604. ; pascal void SetControlAction(ControlHandle theControl, ControlActionUPP actionProc)
  605. ;
  606.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  607.         _SetControlAction:    OPWORD    $A96B
  608.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  609.         IMPORT_CFM_FUNCTION SetControlAction
  610.     ENDIF
  611.  
  612. ;
  613. ; pascal ControlActionUPP GetControlAction(ControlHandle theControl)
  614. ;
  615.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  616.         _GetControlAction:    OPWORD    $A96A
  617.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  618.         IMPORT_CFM_FUNCTION GetControlAction
  619.     ENDIF
  620.  
  621.  
  622. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  623. ;      
  624. ;   • CONTROL ACCESSOR API'S
  625. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  626.  
  627.  
  628.  
  629. ;
  630. ; pascal void SetControlReference(ControlHandle theControl, SInt32 data)
  631. ;
  632.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  633.         _SetControlReference:    OPWORD    $A95B
  634.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  635.         IMPORT_CFM_FUNCTION SetControlReference
  636.     ENDIF
  637.  
  638. ;
  639. ; pascal SInt32 GetControlReference(ControlHandle theControl)
  640. ;
  641.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  642.         _GetControlReference:    OPWORD    $A95A
  643.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  644.         IMPORT_CFM_FUNCTION GetControlReference
  645.     ENDIF
  646.  
  647. ;
  648. ; pascal Boolean GetAuxiliaryControlRecord(ControlHandle theControl, AuxCtlHandle *acHndl)
  649. ;
  650.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  651.         _GetAuxiliaryControlRecord:    OPWORD    $AA44
  652.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  653.         IMPORT_CFM_FUNCTION GetAuxiliaryControlRecord
  654.     ENDIF
  655.  
  656. ;
  657. ; pascal void SetControlColor(ControlHandle theControl, CCTabHandle newColorTable)
  658. ;
  659.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  660.         _SetControlColor:    OPWORD    $AA43
  661.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  662.         IMPORT_CFM_FUNCTION SetControlColor
  663.     ENDIF
  664.  
  665.  
  666. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  667. ;      
  668. ;   • VALID 'CDEF' MESSAGES
  669. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  670.  
  671.  
  672.  
  673. ; typedef SInt16                         ControlDefProcMessage
  674.  
  675.  
  676. drawCntl                        EQU        0
  677. testCntl                        EQU        1
  678. calcCRgns                        EQU        2
  679. initCntl                        EQU        3
  680. dispCntl                        EQU        4
  681. posCntl                            EQU        5
  682. thumbCntl                        EQU        6
  683. dragCntl                        EQU        7
  684. autoTrack                        EQU        8
  685. calcCntlRgn                        EQU        10
  686. calcThumbRgn                    EQU        11
  687. drawThumbOutline                EQU        12
  688.  
  689. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  690. ;      
  691. ;   • MAIN ENTRY POINT FOR 'CDEF'
  692. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  693.  
  694.  
  695.  
  696.  
  697. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  698. ;      
  699. ;   • CONSTANTS FOR DRAWCNTL MESSAGE PASSED IN PARAM
  700. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  701.  
  702.  
  703.  
  704. kDrawControlEntireControl        EQU        0
  705. kDrawControlIndicatorOnly        EQU        129
  706.  
  707. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  708. ;      
  709. ;   • CONSTANTS FOR DRAGCNTL MESSAGE PASSED IN PARAM
  710. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  711.  
  712.  
  713.  
  714.  
  715. kDragControlEntireControl        EQU        0
  716. kDragControlIndicator            EQU        1
  717.  
  718. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  719. ;      
  720. ;   • DRAG CONSTRAINT STRUCTURE PASSED IN PARAM FOR THUMBCNTL MESSAGE (IM I-332)
  721. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  722.  
  723.  
  724.  
  725. IndicatorDragConstraint    RECORD 0
  726. limitRect                 ds        Rect            ; offset: $0 (0)
  727. slopRect                 ds        Rect            ; offset: $8 (8)
  728. axis                     ds.w    1                ; offset: $10 (16)
  729. sizeof                     EQU *                    ; size:   $12 (18)
  730.                         ENDR
  731. ; typedef struct IndicatorDragConstraint * IndicatorDragConstraintPtr
  732.  
  733. ; typedef IndicatorDragConstraintPtr *    IndicatorDragConstraintHandle
  734.  
  735.     IF OLDROUTINENAMES THEN
  736.  
  737. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  738. ;   • OLDROUTINENAMES
  739. ;  —————————————————————————————————————————————————————————————————————————————————————————————————————————
  740.  
  741.  
  742. ;  Variants applicable to all controls (at least ones with text)
  743.  
  744. useWFont                        EQU        $08
  745.  
  746. inLabel                            EQU        1
  747. inMenu                            EQU        2
  748. inTriangle                        EQU        4
  749. inButton                        EQU        10
  750. inCheckBox                        EQU        11
  751. inUpButton                        EQU        20
  752. inDownButton                    EQU        21
  753. inPageUp                        EQU        22
  754. inPageDown                        EQU        23
  755. inThumb                            EQU        129
  756.  
  757. kNoHiliteControlPart            EQU        0
  758. kInLabelControlPart                EQU        1
  759. kInMenuControlPart                EQU        2
  760. kInTriangleControlPart            EQU        4
  761. kInButtonControlPart            EQU        10
  762. kInCheckBoxControlPart            EQU        11
  763. kInUpButtonControlPart            EQU        20
  764. kInDownButtonControlPart        EQU        21
  765. kInPageUpControlPart            EQU        22
  766. kInPageDownControlPart            EQU        23
  767. kInIndicatorControlPart            EQU        129
  768. kReservedControlPart            EQU        254
  769. kControlInactiveControlPart        EQU        255
  770.     ENDIF    ; OLDROUTINENAMES
  771.  
  772.     ENDIF ; __CONTROLS__ 
  773.  
  774.